import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    //用户界面信息
    {
      path: '/home',
      name: 'home',
      component: ()=>import('../views/home.vue'),
      children:[{
        path:'userhome',
        name:'userhome',
        component:()=>import('../views/userhome/userhome.vue')
      },
      {
        path:'activity',
        name:'activity',
        component:()=>import('../views/userhome/activity.vue')
      },{
        path:'detail',
        name:'detail',
        component:()=>import('../views/userhome/detail.vue')
      },{
        path:'coser',
        name:'coser',
        component:()=>import('../views/userhome/coser.vue')
      },
      {
        path:'user',
        name:'user',
        component:()=>import('../views/userhome/user.vue')
      }]
    },
    //登录页面信息
    {
      path:'/',
      name:'logn',
      component:()=>import('../views/logn.vue')
    },
    //后台管理页面信息
    {
      path:'/manage',
      name:'manage',
      component:()=>import('../views/manage.vue'),
      children:[{
        path:'managehome',
        name:'managehome',
        component:()=>import('../views/manage/managehome.vue')
      },{
        path:'loopmanage',
        name:'loopmanage',
        component:()=>import('../views/manage/loopmanage.vue')
      },{
        path:'loopdel',
        name:'loopdel',
        component:()=>import('../views/manage/loopdel.vue')
      },
      {
        path:'showmanage',
        name:'showmanage',
        component:()=>import('../views/manage/showmanage.vue')
      },
    {path:'showadd',
    name:'showadd',
    component:()=>import('../views/manage/showadd.vue')

    },
    {path:'actsadd',
    name:'actsadd',
    component:()=>import('../views/manage/actsadd.vue')

    },
    {path:'actsdel',
    name:'actsdel',
    component:()=>import('../views/manage/actsdel.vue')

    },
  {
    path:'coseradd',
    name:'coseradd',
    component:()=>import('../views/manage/coseradd.vue')
  }]
    }
  ]
})

export default router
